package com.notemanagement.ui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RelativeLayout;

import com.notemanagement.R;
import com.notemanagement.database.SQLiteHelper;
import com.notemanagement.utils.Constant;


public class MainActivity extends Activity implements View.OnClickListener {

    private RelativeLayout ll_order, ll_debit, ll_stock_in, ll_stock_out, ll_category;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Constant.db = SQLiteHelper.getInstance(this);
        ll_order = (RelativeLayout) findViewById(R.id.ll_order);
        ll_debit = (RelativeLayout) findViewById(R.id.ll_debit);
        ll_stock_in = (RelativeLayout) findViewById(R.id.ll_stock_in);
        ll_stock_out = (RelativeLayout) findViewById(R.id.ll_stock_out);
        ll_category = (RelativeLayout) findViewById(R.id.ll_category);

        ll_order.setOnClickListener(this);
        ll_debit.setOnClickListener(this);
        ll_stock_in.setOnClickListener(this);
        ll_stock_out.setOnClickListener(this);
        ll_category.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.ll_order:
                Intent intent = new Intent(this, Order.class);
                startActivity(intent);
                break;
            case R.id.ll_category:
                Intent intent1 = new Intent(this, Category.class);
                startActivity(intent1);
                break;

        }
    }
}
